package com.rookie.tool.module.example.excel;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentFontStyle;
import lombok.Data;

import java.util.Date;

/**
 * @author rookie
 * 设置文档样式 sine 2.2.0-beta1
 * @HeadRowHeight(20)
 * @ContentRowHeight(15)
 * @ColumnWidth(15)
 * @HeadStyle(fillForegroundColor = 10)
 * @HeadFontStyle(fontHeightInPoints = 10)
 * @ContentStyle(fillForegroundColor = 10)
 * @ContentFontStyle(fontHeightInPoints = 10)
 */
@Data
public class Person {

    @ContentFontStyle(fontHeightInPoints = 10)
    @ExcelProperty(index = 0,value = "年龄")
    private Integer age;

    @ExcelProperty(index = 1,value = "姓名")
    private String name;

    @ExcelProperty(index = 2,value = "地址")
    private String address;

    @ColumnWidth(30)
    @ExcelProperty(index = 3,value = "创建时间")
    private Date createTime;

    @ColumnWidth(30)
    @DateTimeFormat("yyyy年MM月dd日HH时mm分ss秒")
    @ExcelProperty(index = 4,value = "最后更新时间")
    private String updateTime;
}
